// JFC
import java.awt.*;
import java.awt.image.BufferedImage;

// GTGE
import com.golden.gamedev.*;
import com.golden.gamedev.object.GameFont;
import com.golden.gamedev.object.background.ImageBackground;
import com.golden.gamedev.util.FontUtil;

// GTGE GUI
import com.golden.gamedev.gui.*;
import com.golden.gamedev.gui.toolkit.*;


public class menu extends Game {


	private FrameWork 	frame;	// gui framework

	//private Color 		bgColor = new Color(255, 128, 64);
	ImageBackground bg;


 /****************************************************************************/
 /**********************************  ***************************************/
 /****************************************************************************/

	public void initResources() {
//		setFPS(3000);
		setMaskColor(Color.GREEN);

		// creates the gui frame work
		frame = new FrameWork(bsInput, getWidth(), getHeight());
		// turn on label bordering for default
		// -> to see label boundary
//		frame.getTheme().getUIRenderer("Label").put("Background Border Color", Color.BLACK);

		///////// adding components into gui framework /////////

		// the first component (button component)
		// simply add component to framework without any modification
		frame.add(new TButton("New Game", 20, 50, 120, 40));
		// frame.get() method is return the latest inserted component
		frame.add(new TButton("Load Saved Game", 60, 100, 150, 40));
		frame.add(new TButton("Instruction Manual", 100, 150, 160, 40));
		frame.add(new TButton("Options", 140, 200, 160, 40));
		bg  = new ImageBackground(getImage("images/fate155.jpg"));
	}

 /****************************************************************************/
 /***************************** UPDATE GAME **********************************/
 /****************************************************************************/

	public void update(long elapsedTime) {
		frame.update();
	}


 /****************************************************************************/
 /***************************** RENDER GAME **********************************/
 /****************************************************************************/

	public void render(Graphics2D g) {
//		g.setColor(bgColor);
//		g.fillRect(0,0,getWidth(),getHeight());
		bg.render(g);
		frame.render(g);

	}


 /****************************************************************************/
 /***************************** MAIN-CLASS ***********************************/
 /****************************************************************************/

	public static void main(String[] args) {
		GameLoader menu = new GameLoader();
		menu.setup(new menu(), new Dimension(800, 600), false);
		menu.start();

//		OpenGLGameLoader test = new OpenGLGameLoader();
//		test.setupLWJGL(new test(), new Dimension(640, 480), false);
//		test.start();
	}

}